import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const zcMedicalOrderListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderList',
      data: data
    }
  })
}

// 新增
export const zcMedicalOrderAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderAddAdmin',
      data: data
    }
  })
}

// 修改
export const zcMedicalOrderEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderEdit',
      data: data
    }
  })
}

// 查看
export const zcMedicalOrderSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderSee',
      data: data
    }
  })
}

// 删除
export const zcMedicalOrderDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderDel',
      data: data
    }
  })
}

// 归档
export const zcMedicalOrderEndApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalOrderEnd',
      data: data
    }
  })
}

// 资产明细
export const zcMedicalAssetDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalAssetDetailedList',
      data: data
    }
  })
}

// 药品明细
export const zcMedicalDrugDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcMedicalDrugDetailedList',
      data: data
    }
  })
}
